package com.ktwlrj.autotask.controller;

import com.ktwlrj.autotask.service.FundService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * @author yuxf
 * @version 1.0
 * @date 2021/4/1 10:33
 */
@RestController
@RequestMapping("/demo")
public class DemoController {


    @Autowired
    RestTemplate restTemplate;
    @Autowired
    FundService fundService;

    @GetMapping("/testTask")
    public Object testTask() {
        return System.currentTimeMillis();
    }

    public Object test050701() {

        return restTemplate;

    }

    @GetMapping("/testFund")
    public Object testFund() {

        fundService.sendSmsMessage();
        return "成功";
    }
}
